package com.knife.blog.web.action;

import com.knife.blog.logic.BlogCircleDirService;
import com.knife.blog.logic.impl.BlogCircleDirServiceImpl;
import com.knife.web.Module;
import com.knife.web.Page;
import com.knife.web.WebForm;
import com.knife.web.tools.IActiveUser;
import com.knife.web.tools.IPageList;

public class BlogCircleDirAction extends BaseCrudAction {
	BlogCircleDirService blogCircleDirService = BlogCircleDirServiceImpl.getInstance();

	@Override
	public IPageList doQuery(WebForm form, int currentPage, int pageSize) {
		// TODO 自动生成方法存根
		return blogCircleDirService.queryBlogCircleDir();
	}
	
	public Page doChoice(WebForm form,Module module){
		String fatherDir = (String)form.get("fatherDir");
		IPageList pList = blogCircleDirService.queryChildCircleDir(fatherDir, 0, -1);
		form.addResult("list", pList.getResult());
		return new Page("xmlChoice","/xmlChoice.xml","template");
		
	}

	@Override
	public Object form2Obj(WebForm form) {
		// TODO 自动生成方法存根
		return null;
	}

}
